<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Open a persistent database connection</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.odbc-pconnect" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_pconnect</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">odbc_pconnect</span> &mdash; <span class="dc-title">Open a persistent database connection</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.odbc-pconnect-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>odbc_pconnect</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$dsn</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$user</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$cursor_type</code></span>
  ] ) : <span class="type">resource</span></div>

  <p class="para rdfs-comment">
   Opens a persistent database connection.
  </p>
  <p class="para">
   This function is much like
   <span class="function"><a href="odbc_connect.html" class="function">odbc_connect()</a></span>, except that the connection is
   not really closed when the script has finished.  Future requests
   for a connection with the same <code class="parameter">dsn</code>,
   <code class="parameter">user</code>, <code class="parameter">password</code>
   combination (via <span class="function"><a href="odbc_connect.html" class="function">odbc_connect()</a></span> and
   <span class="function"><strong>odbc_pconnect()</strong></span>) can reuse the persistent
   connection.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.odbc-pconnect-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   See <span class="function"><a href="odbc_connect.html" class="function">odbc_connect()</a></span> for details.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.odbc-pconnect-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an ODBC connection id or 0 (<strong><code>FALSE</code></strong>) on
   error.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.odbc-pconnect-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    Persistent connections have no effect if PHP is used as a CGI
    program.
   </span>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.odbc-pconnect-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="odbc_connect.html" class="function" rel="rdfs-seeAlso">odbc_connect()</a> - Connect to a datasource</span></li>
    <li class="member"><a href="features.persistent_connections.html" class="link">Persistent Database Connections</a></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>